package com.btt.pattern.prototype.simple;

import java.util.List;

/**
 * 浅克隆-->实现Cloneable接口并重写clone()方法
 * 只是将属性的引用复制过去，一个对象改变另一个对象随之改变
 *
 * created by Btt on 2018/6/28
 */

public class Prototype implements Cloneable {

    private String name;

    private List list;

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List getList() {
        return list;
    }

    public void setList(List list) {
        this.list = list;
    }
}
